home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1990: Discy Business / Discy Business.2mg / DEV.CD / TOOLS / FILETYPE.NOTES / FTN.19.XXXX < prev    next >
Encoding:
Text File  |  1989-08-04  |  22.2 KB  |  450 lines  |  [04] ASCII Text (0x0000)

  1. Apple II
  2. File Type Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. File Type:         $19 (25)
  8. Auxiliary Type:    All
  9.  
  10. Full Name:     AppleWorks Data Base File
  11. Short Name:    AppleWorks DB File
  12.  
  13. Revised by:    Matt Deatherage & John Kinder, CLARIS Corp.     September 1989
  14. Written by:    Bob Lissner                                      February 1984
  15.  
  16. Files of this type and auxiliary type contain an AppleWorks(R) Data Base file.
  17. Changes since May 1989:  Updated to include AppleWorks 2.1 and AppleWorks 
  18. 3.0.
  19. _____________________________________________________________________________
  20.  
  21. Files of type $19 and any auxiliary type contain an AppleWorks Data Base file.  
  22. AppleWorks is published by CLARIS.  CLARIS also has additional information on 
  23. AppleWorks files SEG.PR and SEG.ER.  For information on AppleWorks, contact 
  24. CLARIS at:
  25.  
  26.                     CLARIS Corporation
  27.                     5201 Patrick Henry Drive
  28.                     P.O. Box 58168
  29.                     Santa Clara, CA 95052-8168
  30.  
  31.                     Technical Support
  32.                     Telephone:  (408) 727-9054
  33.                     AppleLink:  Claris.Tech
  34.  
  35.                     Customer Relations
  36.                     Telephone:  (408) 727-8227
  37.                     AppleLink:  Claris.CR
  38.  
  39. AppleWorks was created by Bob Lissner.  AppleWorks 2.1 was done by Bob Lissner 
  40. and John Kinder of CLARIS.  AppleWorks 3.0 was done by Randy Brandt, Alan Bird 
  41. and Rob Renstrom of Beagle Bros Software with John Kinder of CLARIS.
  42.  
  43.  
  44. Definitions
  45.  
  46. The following definitions apply to AppleWorks files in addition to those 
  47. defined for all Apple II file types:
  48.  
  49.     MRL    Data base multiple record layout
  50.     SRL    Data base single record layout
  51.     RAC    Review/Add/Change screen
  52.     DB     AppleWorks or /// E-Z Pieces Data Base
  53.     SS     AppleWorks or /// E-Z Pieces Spreadsheet
  54.     WP     AppleWorks or /// E-Z Pieces Word Processor
  55.     AW     AppleWorks or /// E-Z Pieces
  56.  
  57.  
  58. Auxiliary Type Definitions
  59.  
  60. The volume or subdirectory auxiliary type word for this file type is defined 
  61. to control uppercase and lowercase display of filenames.  The highest bit of 
  62. the least significant byte corresponds to the first character of the filename, 
  63. the next highest bit of the least significant byte corresponds to the second 
  64. character, etc., through the second bit of the most significant byte, which 
  65. corresponds to the fifteenth character of the filename.
  66.  
  67. AppleWorks performs the following steps when it saves a file to disk:
  68.  
  69.   1.  Zeros all 16 bits of the auxiliary type word.
  70.   2.  Examines the filename for lowercase letters.  If one is found, it 
  71.       changes the corresponding bit in the auxiliary type word to 1 and 
  72.       changes the letter to uppercase.
  73.   3.  Examines the filename for spaces.  If one is found, it changes the 
  74.       corresponding bit in the auxiliary type word to 1 and changes the 
  75.       space to a period.
  76.  
  77. When files are read from disk, the filename and auxiliary type information 
  78. from the directory file entry are used to determine which characters should be 
  79. lowercase and which periods should be displayed as spaces.  If you use the 
  80. auxiliary type bytes for a different purpose, AppleWorks will still display 
  81. the filenames, but the wrong letters are likely lowercase.
  82.  
  83.  
  84. File Version Changes
  85.  
  86. Certain features present in AppleWorks 3.0 files are not backward-compatible 
  87. to 2.1 and earlier versions.  Such features are noted in the text.  AppleWorks 
  88. Data Base files which may not be loaded by versions prior to 3.0 are 
  89. identified by a non-zero byte at location +218, referred to as location 
  90. DBMinVers.
  91.  
  92. Those features added for AppleWorks 2.0, 2.1 and 3.0 not previously documented 
  93. are indicated with that version number in the margin.
  94.  
  95.  
  96. Data Base Files
  97.  
  98. Data base files start with a variable length header, followed by 600 bytes for 
  99. each report format (if any), the standard values record, then variable length 
  100. information for each record.
  101.  
  102. Header Record
  103.  
  104. The header contains category names, record selection rules, counts, screen 
  105. positioning information, and all other non-record specific information.
  106.  
  107. +000 to +001       Word     The number of bytes in the remainder 
  108.                             of the header record.  Use this 
  109.                             count for your next ProDOS read from 
  110.                             the disk.
  111. +002 to +029                Ignore these bytes.
  112. +030               Byte     Cursor direction when the Return key 
  113.                             is pressed in SRL.  $01: Order in 
  114.                             which you defined categories or $02: 
  115.                             Left to right, top to bottom.
  116. +031               Byte     What direction should the cursor go 
  117.                             when you press the Return key in the 
  118.                             MRL?  D)own or  R)ight.
  119. +032 to +033                Ignore these bytes.
  120. +034               Byte     Style of display that 
  121.                             Review/Add/Change was using when the 
  122.                             file was saved:  R: SRL.  Slash (/): 
  123.                             MRL.
  124. +035               Byte     Number of categories per record.  
  125.                             Values from $01 to $1E.
  126. 3.0 +036 to +037   Word     Number of records in file.
  127.                             If DBMinVers is non-zero, the high 
  128.                             bit of this word may be set.  If it 
  129.                             is, there are more than eight 
  130.                             reports and the remaining 15 bits 
  131.                             contain the true number of records 
  132.                             defined.
  133. 3.0 +038           Byte     Number of reports in a file, maximum 
  134.                             of 8 (20 for 3.0).
  135. +039 to +041                Ignore these bytes.
  136. +042 to +071       Bytes    For each of up to 30 columns, 
  137.                             showing the number of spaces used 
  138.                             for this column on the MRL.  Be sure 
  139.                             you understand that categories may 
  140.                             have been rearranged on the MRL.  
  141.                             Byte +042 refers to the leftmost 
  142.                             column on the MRL.
  143. +072 to +077                Ignore six bytes.
  144. +078 to +107       Bytes    For up to 30 categories on the MRL, 
  145.                             the defined category that appears in 
  146.                             each position.  Byte +078 is the 
  147.                             leftmost column of the MRL and has a 
  148.                             value from $01 to $1E that defines 
  149.                             which of the category names appears 
  150.                             in this position.  These numbers 
  151.                             change as a result of changing the 
  152.                             layout of the MRL.
  153. +108 to +113                Ignore six bytes.
  154. +114 to +143       Bytes    For up to 30 categories on the SRL, 
  155.                             the horizontal screen position.  
  156.                             These are changed as a result of 
  157.                             changing the layout of the SRL.  
  158.                             AppleWorks makes sure that these 
  159.                             entries, and the vertical screen 
  160.                             positions, are kept in order from 
  161.                             left to right within top to bottom.
  162. +144 to +149                Ignore these six bytes.
  163. +150 to +179       Bytes    For up to 30 categories on the SRL, 
  164.                             the vertical screen position.
  165. +180 to +185                Ignore six bytes.
  166. +186 to +215       Bytes    For up to 30 categories on the SRL, 
  167.                             which of the category names appears 
  168.                             in this position. These change as a 
  169.                             result of changing the SRL.  This 
  170.                             number refers to the category names 
  171.                             listed below.
  172. +216 to +217                Ignore two bytes.
  173. 3.0 +218           Byte     DBMinVers.  The minimum version of 
  174.                             AppleWorks needed to read this file.  
  175.                             This will be $00 unless there are 
  176.                             more than 8 report formats; it will 
  177.                             then contain the version number 30 
  178.                             ($1E) or greater.
  179. 3.0 +219           Byte     The first frozen column in the 
  180.                             titles.
  181. 3.0 +220           Byte     If this is zero, no titles are 
  182.                             present.  If non-zero, this is the 
  183.                             last frozen column.
  184. 3.0 +221           Byte     Leftmost active column.  This is 
  185.                             zero-based; if this value is zero, 
  186.                             it means column one, etc.
  187. +222               Byte     Number of categories on MRL.  Will 
  188.                             be less than or equal to the number 
  189.                             of categories in the file.  SRL 
  190.                             displays all categories, so there is 
  191.                             no equivalent number for SRL.
  192. +223 to +224       Word     For the first line of RAC selection 
  193.                             rules.  Zero means no selection 
  194.                             rules, while any other value refers 
  195.                             to the category name that is tested.  
  196.                             The high byte will always be zero.
  197. +225 to +226       Word     Category name for the second line of 
  198.                             RAC selection rules.  Zero means 
  199.                             that there is only one line.
  200. +227 to +228       Word     Category name for the third line of 
  201.                             RAC selection rules.  Zero means 
  202.                             that there is no third line.
  203. +229 to +230       Word     For the first line of RAC rules, 
  204.                             which of the tests is to be applied.  
  205.                             1 means equals, 2 means greater than 
  206.                             and so on.
  207. +231 to +232       Word     Test for the second line of rules, 
  208.                             if any.
  209. +233 to +234       Word     Test for the third line, if any.
  210. +235 to +236       Word     Continuation code for the first 
  211.                             line:  1: And, 2: Or, 3: Through.
  212. +237 to +238       Word     Continuation code for the second 
  213.                             line.
  214. +239 to +240       Word     Continuation code for the third 
  215.                             line.  Not possible, so it is always 
  216.                             zero.
  217. +241 to +272       String   Maximum length of 30 bytes.  
  218.                             Comparison information for the first 
  219.                             line RAC selection rules.
  220. +273 to +304       String   Comparison for the second line.
  221. +305 to +336       String   Comparison for the third line.
  222. +337 to +356                Ignore these six bytes.
  223. +357 to +378       String   Name of the first category.  Maximum 
  224.                             length of 20 bytes.  If the file has 
  225.                             only one category, the header record 
  226.                             will end here.
  227. +379 to +400       String   Name of the second category, if any.  
  228.                             This area will not be on the header 
  229.                             record if there is only one 
  230.                             category.
  231. +401               22 Bytes Additional 22 byte entries for all 
  232.                             remaining categories.  The size of 
  233.                             the header record depends on the 
  234.                             number of categories.  Space is not 
  235.                             maintained past the last category.
  236.  
  237. Report Records
  238.  
  239. Report records follow the header record.  One of the header record categories 
  240. tells you how many report records to expect.  The number will be from zero to 
  241. eight.  Each report record is 600 bytes, and contains:
  242.  
  243. +000 to +019       String   Report name.  Maximum length of 19 
  244.                             characters.
  245. +020 to +052       Bytes    Column width for up to 33 columns in 
  246.                             a tables-style report format.  Byte 
  247.                             +020 is for the leftmost column on a 
  248.                             tables-style report.  There can be 
  249.                             up to 30 categories from the file, 
  250.                             plus 3 more calculated columns.
  251.                             For labels-style report formats, the 
  252.                             value is a byte that has the 
  253.                             horizontal position of this 
  254.                             category, relative to the left 
  255.                             margin.
  256. +053 to +055                Skip 3 bytes.
  257. +056 to +088       Bytes    For tables-style:  Number of spaces 
  258.                             to be printed at the right of 
  259.                             justified columns.
  260.                             For labels-style:  Vertical position 
  261.                             on the report for each of up to 30 
  262.                             categories.  A value of 1 means that 
  263.                             category is on the first line of 
  264.                             labels-style report.
  265. +089 to +091                Skip 3 bytes.
  266. +092 to +124       Bytes    For up to 33 columns of tables-
  267.                             style:  Values from 1 to 30 refer to 
  268.                             which category name appears in this 
  269.                             column on the report.  Values of 
  270.                             $80, $81 and $82 are the three 
  271.                             calculated categories, from left to 
  272.                             right.
  273.                             For labels-style:  Same as tables-
  274.                             style, minus the calculated 
  275.                             categories.
  276. +125 to +127                Skip these three bytes.
  277. +128 to +160       Bytes    For up to 33 columns of tables-
  278.                             style:  $99 means no foot totals, 0 
  279.                             through 4 means the number of 
  280.                             decimal places for a foot total.
  281.                             For labels-style:  For up to 30 
  282.                             categories on report, Boolean bytes 
  283.                             whether or not category names are to 
  284.                             be printed.
  285. +161 to +163                Skip these three bytes.
  286. +164 to +196       Bytes    For up to 33 columns of tables-
  287.                             style:  $99 means left justified, 0 
  288.                             through 4 means right justified with 
  289.                             0 to 4 decimal places.
  290.                             For up to 30 categories of labels-
  291.                             style:  Boolean bytes whether or not 
  292.                             to float (OA-J) this category up 
  293.                             against the category to its left.
  294. +197 to +199                Skip three bytes.
  295. +200               Byte     Number of categories on report.  
  296.                             Includes calculated categories, if 
  297.                             any.
  298. +201               Byte     Tables-style.  If there is at least 
  299.                             one calculated category, this 
  300.                             contains values from 1 to 33: which 
  301.                             column of the report.
  302.                             Labels-style:  Values from 3 to 21.  
  303.                             Position of the line on the screen 
  304.                             that says "Each record will print nn 
  305.                             lines."
  306. +202               Byte     Tables-style:  Same as +201, but for 
  307.                             the second calculated category, if 
  308.                             any.
  309.                             Labels-style:  Unused.
  310. +203               Byte     Tables-style:  Same as +201, but for 
  311.                             the third calculated category, if 
  312.                             any.
  313.                             Labels-style:  Unused
  314. +204               Byte     Tables-style only:  If there is a 
  315.                             group total column, this byte states 
  316.                             which of the category names is used 
  317.                             as a basis.  Values from 1 to 30.
  318. +205               Byte     Platen width value, in 10ths of an 
  319.                             inch.  For example, a value of 8.0 
  320.                             inches entered by the user will show 
  321.                             as 80 or $50.
  322. +206               Byte     Left margin value.  All inches 
  323.                             values are in 10ths.
  324. +207               Byte     Right margin value.
  325. +208               Byte     Characters per inch.
  326. +209               Byte     Paper length value, in 10ths of an 
  327.                             inch.
  328. +210               Byte     Top margin value.
  329. +211               Byte     Bottom margin value.
  330. +212               Byte     Lines per inch.  6 or 8.
  331. +213               Byte     Not relevant.  Probably always a 
  332.                             "C."
  333. +214               Byte     Type of report format.  H: tables-
  334.                             style, V: labels-style.
  335. +215               Byte     Spacing:  S(ingle, D(ouble, or 
  336.                             T(riple.  Expect these three 
  337.                             letters, even in European versions.
  338. +216               Byte     Print report header.  Boolean.
  339. +217               Byte     Tables-style:  If user has specified 
  340.                             group totals, Boolean, just print 
  341.                             the group totals.
  342. +218               Byte     Labels-style:  Boolean, omit the 
  343.                             line when all entries on the line 
  344.                             are blank.
  345. +219               Byte     Labels-style:  Boolean, keep the 
  346.                             number of lines the same within each 
  347.                             record.
  348. +220 to +301       String   80-byte string.  Title line, if any.
  349. +302 to +323       String   Tables-style.  20-byte string.  Name 
  350.                             of the first calculated category, if 
  351.                             any.
  352. +324 to +355       String   Tables-style.  30-byte string.  
  353.                             Calculation rules for first 
  354.                             calculated category, if any.
  355. +356 to +409       String   Tables-style.  Name and rules for 
  356.                             second calculated category, if any.
  357. +410 to +463       String   Tables-style.  Name and rules for 
  358.                             third calculated category, if any.
  359. +464 to +477       String   If user has specified "Send special 
  360.                             codes to printer," this is a 13 byte 
  361.                             string containing those codes.
  362. +478               Byte     Boolean:  Print a dash when an entry 
  363.                             is blank.
  364. +479 to +592       Words &  Record selection rules.  Exact same
  365.                    Strings  format as described in the header 
  366.                             record.
  367. +593 to +599                Unused
  368.  
  369. Data Records
  370.  
  371. Data records follow the report records.  The first data record contains the 
  372. standard values.  Each following data record corresponds to one data base 
  373. record.
  374.  
  375. These records contain all of the categories within one stream of data.  The 
  376. category entries are in the same order that the category names appear in the 
  377. header record.
  378.  
  379. Bytes +0 and +1 are a word that contains a count of the number of bytes in the 
  380. remainder of the record.
  381.  
  382. Byte +2 of each record will always be a control byte.  Other control bytes 
  383. within each record define the contents of the record.  Control bytes may be:
  384.  
  385. $01-$7F                     This is a count of the number of following bytes 
  386.                             that are the contents of a category.
  387. $81-$9E                     This (minus $80) is a count of the number of 
  388.                             categories to be skipped.  For example, $82 
  389.                             means skip two categories.
  390. $FF                         This indicates the end of the record.
  391.  
  392. The information in individual categories may have some special coding so that 
  393. date and time entries can be arranged (sorted).
  394.  
  395. Date entries have the following format:
  396.  
  397. +000              Byte          $C0 (192).  Identifies a date entry.
  398. +001 to 002       Two bytes     ASCII year code, like "84" ($38 $34).
  399. +003              Byte          ASCII month code.  A means January, 
  400.                                 L means December.
  401. +004 to +005      Two bytes     ASCII day of the month, like "31" 
  402.                                 ($33 $31).
  403.  
  404. Time entries have the following format:
  405.  
  406. +000              Byte          $D4 (212).  Identifies a time entry.
  407. +001              Byte          ASCII hour code.  A means 00 (the 
  408.                                 hour after midnight).  X means 23, 
  409.                                 the hour before midnight.
  410. +002 to +003      Two bytes     ASCII minute code.  Values from 00 
  411.                                 to 59.
  412.  
  413.  
  414. File Tags
  415.  
  416. All AppleWorks files normally end with two bytes of $FF; tags are 
  417. anything after that.  Although File Tags were primarily designed by 
  418. Beagle Bros, they can be used by any application that needs to create or 
  419. modify an AppleWorks 3.0 file.
  420.  
  421. Because versions of AppleWorks before 3.0 stop at the double $FF, they 
  422. simply ignore tags.
  423.  
  424. The File Tag structure is as follows:
  425.  
  426. +000              Byte          Tag ID.  Should be $FF.
  427. +001              Byte          2nd ID byte.  These values will be 
  428.                                 defined and arbitrated by Beagle 
  429.                                 Bros Software.   Beagle may be 
  430.                                 reached at:
  431.  
  432.                                 Beagle Bros Inc
  433.                                 6215 Ferris Square, #100
  434.                                 San Diego, CA  92121
  435.  
  436. +002 to +003      Word          Data length.  If this is the last 
  437.                                 tag on the file, the low byte (+002) 
  438.                                 will be a count of the tags in this 
  439.                                 file, and the high byte (+003) will 
  440.                                 be $FF.
  441. +004 to nnn       Bytes         Actual tag data, immediately 
  442.                                 followed by the next four-byte tag 
  443.                                 ID.  These bytes do not exist for 
  444.                                 the last tag.
  445.  
  446. There is a maximum of 64 tags per file.  Each tag may be no larger than 
  447. 2K.
  448.  
  449. AppleWorks is a registered trademark of Apple Computer, Inc. licensed to 
  450. Claris Corporation.